import { reactive } from "vue";
import type { FormRules } from "element-plus";



export const DOMAIN_PATTERN = /^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/;
/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  appName: [
    { required: true, message: "应用名称为必填项", trigger: "blur" }
  ],
  cloudId: [
    { required: true, message: "发布服务云为必填项", trigger: "blur" }
  ],
  appUrl: [
    { required: true, message: "发布URI为必填项", trigger: "blur" }
  ],
  appOriginalUrl: [
    { required: true, message: "应用源地址为必填项", trigger: "blur" }
  ]
});
